"""
键盘的操作:

键盘的执行方法就是 send_keys


"""
import time

from selenium import webdriver
from selenium.webdriver import Keys

from selenium.webdriver.common.by import By

# 1. 先创建浏览器驱动对象
driver=webdriver.Chrome()
# 2 通过get方法打开页面
driver.get("http://localhost:8081/regA.html")

ele=driver.find_element(By.CSS_SELECTOR,".emailA")
ele.send_keys('admin')

#全选
ele.send_keys(Keys.CONTROL,'a')




time.sleep(10)

# 4. 关闭浏览器驱动对象
driver.quit()